package cn.isjinhao.se.sql.grammar.statement.retrieve.represention;

import cn.isjinhao.se.sql.grammar.CurdStatementVisitor;
import cn.isjinhao.se.sql.grammar.CurdStatement;
import cn.isjinhao.se.sql.lexical.token.Token;

/**
 * @author 01395265
 * @description TODO
 * @date 2021/3/3
 */
public class LimitSeg extends CurdStatement {

    private Token num;

    private Token offset;

    public LimitSeg(Token num, Token offset) {
        this.num = num;
        this.offset = offset;
    }

    public LimitSeg(Token num) {
        this.num = num;
        this.offset = null;
    }

    @Override
    public <R> R accept(CurdStatementVisitor<R> curdStatementVisitor) {
        return curdStatementVisitor.visitLimitSeg(this);
    }

    public Token getNum() {
        return num;
    }

    public Token getOffset() {
        return offset;
    }

}
